<!DOCTYPE html>
<html lang="zn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Myblog-@yield('title')</title>

    <!-- Fonts -->
    <link rel="stylesheet" href="{{ elixir('assets/css/font-awesome.css') }}">
    <link rel="stylesheet" href="{{ elixir('assets/css/fonts.css') }}">

    <!-- Styles -->
    <link rel="stylesheet" href="{{ elixir('assets/css/bootstrap.css') }}">
    @yield('partial_css')
    <link rel="stylesheet" href="{{ elixir('assets/css/app.css') }}">
    
    <style>
        body {
            font-family: 'Lato';
        }
        .fa-btn {
            margin-right: 6px;
        }
        .dropdown-menu{
            padding: 10px 0;
            min-width: 0;
        }
        .dropdown-menu > li{
            padding: 5px 0px;
        }
        .dropdown-menu > li > a{
            /*border-bottom: 1px solid #ccc;*/
        }
        @yield('customize_css')
    </style>
    
</head>
<body id="app-layout">
    <nav class="navbar navbar-default navbar-static-top">
        <div class="container">
            
            <div class="navbar-header">
                <!-- Branding Image -->
                <a class="navbar-brand" href="{{ url('/') }}">
                    Myblog
                </a>
            </div>

            <div class="collapse navbar-collapse" id="app-navbar-collapse">
                <!-- Left Side Of Navbar -->
                <ul class="nav navbar-nav">
                    <li><a href="{{ url('/home') }}">首页</a></li>
                    <li><a href="{{ url('/article') }}">文章</a></li>
                    {{--<li><a href="{{ url('/goods') }}">商品</a></li>--}}
                </ul>

                <!-- Right Side Of Navbar -->
                <ul class="nav navbar-nav navbar-right">
                    <!-- Authentication Links -->
                    @if (Auth::guest())
                        <li><a href="{{ url('/login') }}">登录</a></li>
                        <li><a href="{{ url('/register') }}">注册</a></li>
                    @else
                        <li><a href="{{ url('/article/create') }}">添加文章</a></li>
                        {{--<li><a href="{{ url('/goods/create') }}">添加商品</a></li>--}}
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
                                <img id="topheadportrait" width=20 style="display:inline-block" class="img-responsive center-block img-circle" src="{{ !empty(Auth::user()->head_url) ? Auth::user()->head_url : url('images/default/headportrait.jpg') }}" alt="{{ Auth::user()->nickname }}" title="{{ Auth::user()->nickname }}">
                                <span class="caret"></span>
                            </a>
                            <ul class="dropdown-menu" role="menu">
                                <li><a href="{{ url('/myhome') }}"><i class="fa fa-btn fa-home"></i>我的主页</a></li>
                                <li><a href="{{ url('/myconsole') }}"><i class="fa fa-btn fa-user"></i>个人中心</a></li>
                                <li><a href="{{ url('/mymessage') }}"><i class="fa fa-btn fa-bell"></i>消息提示</a></li>
                                <li><a href="{{ url('/mysetting') }}"><i class="fa fa-btn fa-cog"></i>帐号设置</a></li>
                                <li><a href="{{ url('/logout') }}"><i class="fa fa-btn fa-sign-out"></i>退出帐号</a></li>
                            </ul>
                        </li>
                    @endif
                </ul>
            </div>
        </div>
    </nav>

    @yield('content')
    
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <p class="text-center">Copyright © 2000 - 2016 myblog.com ALL Rights Reserved.</p>
            </div>
        </div>
    </div>

    <!-- JavaScripts -->
    <script src="{{ elixir('assets/js/jquery.js') }}"></script>
    <script src="{{ elixir('assets/js/bootstrap.js') }}"></script>
    @yield('partial_js')
    <script src="{{ elixir('assets/js/app.js') }}"></script>
    <script>
        @yield('customize_js')
    </script>
</body>
</html>
